#ifndef __COMBAT_H
#define __COMBAT_H

#include <iostream>
#include <ctime>
#include <string>
#include <sstream>
#include "enemy.h"
#include "player.h"

using namespace std;

class combat
{
	public:
		combat();
		~combat();
		combat(player &currPlayer, enemy &currEnemy);
		void initCombatVars(player currPlayer, enemy currEnemy);
		int randNum(int min, int max); //ubiquitous function
		void printHealth(double health, double maxHealth);
		int attack(int minDmg, int maxDmg, string name, double &health, int fminDmg, int fmaxDmg, string foeName, double &foeHealth); //returns damage done
		int counter(int minDmg, int maxDmg, string name, double health, int fminDmg, int fmaxDmg, string foeName, double &foeHealth);
		void battle(); //the combat loop

	private:
		int totalDmg;
		string enemyName;
		string playerName;
		double enemyHealth;
		double enemyMaxHealth;
		double playerHealth;
		double playerMaxHealth;
		int minDmg;
		int maxDmg;
		int foeMinDmg;
		int foeMaxDmg;
		int critChance;
		int dodgeChance;
		int parryChance;
		int counterChance;
		int missChance;
};
#endif